 //*******************************************************************
 // PP81.java            Author:20172323wyh
 //
 // 读取0～50范围内任意整数，计算每个数据输入的次数并输出。
 //*******************************************************************

 import java.util.Scanner;

 public class PP81
 {
    public static void main(String[] args)
    {
       final int Max = 51;
       Scanner scan1 = new Scanner(System.in);
       Scanner scan2 = new Scanner(System.in);
       int[] numble = new int[Max];
       int another;

       do 
       {
         System.out.println("Enter a number:");
         int Num = scan1.nextInt();

         if (Num >= 0 && Num <= Max)
           numble[Num]++;
         System.out.println("Do you want input again? Input 100 to break.");
         another = scan2.nextInt();
       }
       while (another < 0 || another > 50);

       for (int index = 0; index <= Max; index++)
          { 
            System.out.println(index + ":\t" + numble[index]);
          }
    }
 }
       
